package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Date;


/**
 * The persistent class for the DESTINATARIO database table.
 * 
 */
@Entity
@Table(name="DESTINATARIO")
public class Destinatario implements Serializable {
	private static final long serialVersionUID = 1L;
	private long destinatarioId;
	private String apeMat;
	private String apePat;
	private String codPost;
	private String direcc;
	private String distrito;
	private String dptoId;
	private String dptoOtro;
	private String email;
	private String nombres;
	private String numDocIden;
	private String oficRegId;
	private String paisId;
	private String provId;
	private String razSoc;
	private String regPubId;
	private String tpoEnv;
	private String tpoPers;
	private Date tsCrea;
	private Solicitud solicitud;
	private TmDocIden tmDocIden;

	 /*modificacion Euclides*/
	private TmPai tmPai;
	private TmDepartamento tmDepartamento;
	private TmProvincia tmProvincia;
	/*fin de la modificacion*/
    public Destinatario() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="DESTINATARIO_ID", unique=true, nullable=false)
	public long getDestinatarioId() {
		return this.destinatarioId;
	}

	public void setDestinatarioId(long destinatarioId) {
		this.destinatarioId = destinatarioId;
	}


	@Column(name="APE_MAT", length=30)
	public String getApeMat() {
		return this.apeMat;
	}

	public void setApeMat(String apeMat) {
		this.apeMat = apeMat;
	}


	@Column(name="APE_PAT", length=30)
	public String getApePat() {
		return this.apePat;
	}

	public void setApePat(String apePat) {
		this.apePat = apePat;
	}


	@Column(name="COD_POST", length=30)
	public String getCodPost() {
		return this.codPost;
	}

	public void setCodPost(String codPost) {
		this.codPost = codPost;
	}


	@Column(length=90)
	public String getDirecc() {
		return this.direcc;
	}

	public void setDirecc(String direcc) {
		this.direcc = direcc;
	}


	@Column(length=30)
	public String getDistrito() {
		return this.distrito;
	}

	public void setDistrito(String distrito) {
		this.distrito = distrito;
	}


	@Column(name="DPTO_ID", length=2)
	public String getDptoId() {
		return this.dptoId;
	}

	public void setDptoId(String dptoId) {
		this.dptoId = dptoId;
	}


	@Column(name="DPTO_OTRO", length=30)
	public String getDptoOtro() {
		return this.dptoOtro;
	}

	public void setDptoOtro(String dptoOtro) {
		this.dptoOtro = dptoOtro;
	}


	@Column(length=40)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	@Column(length=40)
	public String getNombres() {
		return this.nombres;
	}

	public void setNombres(String nombres) {
		this.nombres = nombres;
	}


	@Column(name="NUM_DOC_IDEN", length=15)
	public String getNumDocIden() {
		return this.numDocIden;
	}

	public void setNumDocIden(String numDocIden) {
		this.numDocIden = numDocIden;
	}


	@Column(name="OFIC_REG_ID", nullable=false, length=2)
	public String getOficRegId() {
		return this.oficRegId;
	}

	public void setOficRegId(String oficRegId) {
		this.oficRegId = oficRegId;
	}


	@Column(name="PAIS_ID", length=2)
	public String getPaisId() {
		return this.paisId;
	}

	public void setPaisId(String paisId) {
		this.paisId = paisId;
	}


	@Column(name="PROV_ID", length=2)
	public String getProvId() {
		return this.provId;
	}

	public void setProvId(String provId) {
		this.provId = provId;
	}


	@Column(name="RAZ_SOC", length=100)
	public String getRazSoc() {
		return this.razSoc;
	}

	public void setRazSoc(String razSoc) {
		this.razSoc = razSoc;
	}


	@Column(name="REG_PUB_ID", nullable=false, length=2)
	public String getRegPubId() {
		return this.regPubId;
	}

	public void setRegPubId(String regPubId) {
		this.regPubId = regPubId;
	}


	@Column(name="TPO_ENV", nullable=false, length=1)
	public String getTpoEnv() {
		return this.tpoEnv;
	}

	public void setTpoEnv(String tpoEnv) {
		this.tpoEnv = tpoEnv;
	}


	@Column(name="TPO_PERS", nullable=false, length=1)
	public String getTpoPers() {
		return this.tpoPers;
	}

	public void setTpoPers(String tpoPers) {
		this.tpoPers = tpoPers;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_CREA", nullable=false)
	public Date getTsCrea() {
		return this.tsCrea;
	}

	public void setTsCrea(Date tsCrea) {
		this.tsCrea = tsCrea;
	}


	//bi-directional many-to-one association to Solicitud
    @ManyToOne
	@JoinColumn(name="SOLICITUD_ID", nullable=false)
	public Solicitud getSolicitud() {
		return this.solicitud;
	}

	public void setSolicitud(Solicitud solicitud) {
		this.solicitud = solicitud;
	}
	

	//bi-directional many-to-one association to TmDocIden
    @ManyToOne
	@JoinColumn(name="TIPO_DOC_ID")
	public TmDocIden getTmDocIden() {
		return this.tmDocIden;
	}

	public void setTmDocIden(TmDocIden tmDocIden) {
		this.tmDocIden = tmDocIden;
	}

	//bi-directional many-to-one association to TmPais PAIS_ID
	 @ManyToOne
		@JoinColumn(name="PAIS_ID", nullable=false,insertable = false, updatable = false)
	public TmPai getTmPai() {
		return tmPai;
	}
	public void setTmPai(TmPai tmPai) {
		this.tmPai = tmPai;
	}
	
	//bi-directional many-to-one association to TmDepartamento
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="DPTO_ID", referencedColumnName="DPTO_ID", nullable=false,insertable = false, updatable = false),
		@JoinColumn(name="PAIS_ID", referencedColumnName="PAIS_ID", nullable=false,insertable = false, updatable = false)
		})
	public TmDepartamento getTmDepartamento() {
		return tmDepartamento;
	}
	public void setTmDepartamento(TmDepartamento tmDepartamento) {
		this.tmDepartamento = tmDepartamento;
	}

	//bi-directional many-to-one association to TmProvincia
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="PAIS_ID", referencedColumnName="PAIS_ID", nullable=false,insertable = false, updatable = false),
		@JoinColumn(name="DPTO_ID", referencedColumnName="DPTO_ID", nullable=false,insertable = false, updatable = false),
		@JoinColumn(name="PROV_ID", referencedColumnName="PROV_ID", nullable=false,insertable = false, updatable = false)
		})
	public TmProvincia getTmProvincia() {
		return tmProvincia;
	}
	public void setTmProvincia(TmProvincia tmProvincia) {
		this.tmProvincia = tmProvincia;
	}
	
	/*Modificacion euclides*/
	
	
	
}